import Service from './$axios'
import { appName } from '../config';
// const appName = 'lw-mes-gxh'

// 上传图片
export const uploadImg = (data) => {
    return Service({
        url: `${appName}/CalibrationStandard/uploadImg`,
        method: 'post',
        data: data
    })
}
// 查询图片
export const queryImg = (data) => {
    return Service({
        url: `${appName}/CalibrationStandard/queryImg?formName=${data}`,
        method: 'get',
    })
}

// --------------------- 装配质量标准 ---------------------
// 适用机型查询
export const queryProductModel = (data) => {
    return Service({
        url: `${appName}/CalibrationStandard/queryProductModel`,
        method: 'post',
        data: data
    })
}

// 表单信息查询
export const queryFormModel = (data) => {
    return Service({
        url: `${appName}/CalibrationStandard/queryFormModel?type=${data}`,
        method: 'get',
    })
}

// 表单信息新增/修改
export const alterFormModel = (data) => {
    return Service({
        url: `${appName}/CalibrationStandard/alterFormModel`,
        method: 'post',
        data: data
    })
}

// --------------- 机架 --------------
// 查询机架
export const queryRackPageList = (data) => {
    return Service({
        url: `${appName}/CalibrationStandard/queryRackPageList`,
        method: 'post',
        data: data
    })
}

// 编辑/新增-机架
export const alterRackStandard = (data) => {
    return Service({
        url: `${appName}/CalibrationStandard/alterRackStandard`,
        method: 'post',
        data: data
    })
}

// 删除机架
export const deleteRackStandard = (data) => {
    return Service({
        url: `${appName}/CalibrationStandard/deleteRackStandard?${data}`,
        method: 'get'
    })
}

// --------------- 尾板 --------------
// 查询尾板
export const queryTailPageList = (data) => {
    return Service({
        url: `${appName}/CalibrationStandard/queryTailPageList`,
        method: 'post',
        data: data
    })
}

// 编辑/新增-尾板
export const alterTailStandard = (data) => {
    return Service({
        url: `${appName}/CalibrationStandard/alterTailStandard`,
        method: 'post',
        data: data
    })
}

// 删除尾板
export const deleteTailStandard = (data) => {
    return Service({
        url: `${appName}/CalibrationStandard/deleteTailStandard?${data}`,
        method: 'get'
    })
}

// --------------- 哥林柱与头板 --------------
// 查询哥林柱与头板
export const queryColumnStandard = (data) => {
    return Service({
        url: `${appName}/CalibrationStandard/queryColumnStandard`,
        method: 'post',
        data: data
    })
}

// 编辑/新增-哥林柱与头板
export const alterColumnStandard = (data) => {
    return Service({
        url: `${appName}/CalibrationStandard/alterColumnStandard`,
        method: 'post',
        data: data
    })
}

// 删除哥林柱与头板
export const deleteColumnStandard = (data) => {
    return Service({
        url: `${appName}/CalibrationStandard/deleteColumnStandard?${data}`,
        method: 'get'
    })
}

// --------------- 三大板 --------------
// 查询三大板
export const queryThreePlatesStandard = (data) => {
    return Service({
        url: `${appName}/CalibrationStandard/queryThreePlatesStandard`,
        method: 'post',
        data: data
    })
}

// 编辑/新增-三大板
export const alterThreePlatesStandard = (data) => {
    return Service({
        url: `${appName}/CalibrationStandard/alterThreePlatesStandard`,
        method: 'post',
        data: data
    })
}

// 删除三大板
export const deleteThreePlatesStandard = (data) => {
    return Service({
        url: `${appName}/CalibrationStandard/deleteThreePlatesStandard?${data}`,
        method: 'get'
    })
}

// --------------- 哥林柱与机架 --------------
// 查询哥林柱与机架
export const queryColumnAndRackStandard = (data) => {
    return Service({
        url: `${appName}/CalibrationStandard/queryColumnAndRackStandard`,
        method: 'post',
        data: data
    })
}

// 编辑/新增-哥林柱与机架
export const alterColumnAndRackStandard = (data) => {
    return Service({
        url: `${appName}/CalibrationStandard/alterColumnAndRackStandard`,
        method: 'post',
        data: data
    })
}

// 删除哥林柱与机架
export const deleteColumnAndRackStandard = (data) => {
    return Service({
        url: `${appName}/CalibrationStandard/deleteColumnAndRackStandard?${data}`,
        method: 'get'
    })
}

// --------------- 装配外观 --------------
// 大机装配检查标准（装配外观)
export const queryBigMachineAssemblyFace = (data) => {
    return Service({
        url: `${appName}/CalibrationStandard/queryBigMachineAssemblyFace`,
        method: 'post',
        data: data
    })
}

// 编辑/新增-大机装配检查标准(装配外观)
export const alterBigMachineAssemblyFace = (data) => {
    return Service({
        url: `${appName}/CalibrationStandard/alterBigMachineAssemblyFace`,
        method: 'post',
        data: data
    })
}

// 删除大机装配检查标准（装配外观)
export const deleteBigMachineAssemblyFace = (data) => {
    return Service({
        url: `${appName}/CalibrationStandard/deleteBigMachineAssemblyFace?${data}`,
        method: 'get'
    })
}

// --------------- 装配过程 --------------
// 大机装配检查标准（装配过程)
export const queryBigMachineAssemblyCourse = (data) => {
    return Service({
        url: `${appName}/CalibrationStandard/queryBigMachineAssemblyCourse`,
        method: 'post',
        data: data
    })
}

// 编辑/新增-大机装配检查标准(装配过程)
export const alterBigMachineAssemblyCourse = (data) => {
    return Service({
        url: `${appName}/CalibrationStandard/alterBigMachineAssemblyCourse`,
        method: 'post',
        data: data
    })
}

// 删除大机装配检查标准（装配过程)
export const deleteBigMachineAssemblyCourse = (data) => {
    return Service({
        url: `${appName}/CalibrationStandard/deleteBigMachineAssemblyCourse?${data}`,
        method: 'get'
    })
}


// --------------- 自检表单 --------------
// 查询工序
export const addReturnMessage = () => {
    return Service({
        url: `${appName}/CalibrationStandard/addReturnMessage`,
        method: 'get'
    })
}

// 查询自检表单
export const querySelfCheck = (data) => {
    return Service({
        url: `${appName}/CalibrationStandard/querySelfCheck`,
        method: 'post',
        data: data
    })
}

// 编辑表单跳转页面
export const querySelfCheckDetail = (data) => {
    return Service({
        url: `${appName}/CalibrationStandard/querySelfCheckDetail`,
        method: 'post',
        data: data
    })
}


// 新增/编辑自检表单
export const addSelfCheck = (data) => {
    return Service({
        url: `${appName}/CalibrationStandard/addSelfCheck`,
        method: 'post',
        data: data
    })
}

// 新增自检检验项
export const alterSelfCheckDetail = (data) => {
    return Service({
        url: `${appName}/CalibrationStandard/alterSelfCheckDetail`,
        method: 'post',
        data: data
    })
}

// 删除自检表单
export const deleteSelfCheck = (data) => {
    return Service({
        url: `${appName}/CalibrationStandard/deleteSelfCheck?${data}`,
        method: 'get'
    })
}

// 删除自检检验项
export const deleteSelfCheckDetail = (data) => {
    return Service({
        url: `${appName}/CalibrationStandard/deleteSelfCheckDetail?${data}`,
        method: 'get'
    })
}


// 装配组别下拉框 - 查询
export const queryAssemblyGroup = (data) => {
    return Service({
        url: `${appName}/partManage/queryAssemblyGroup?${data}`,
        method: 'get'
    })
}